package com.itheima.day11.第四题;

import java.io.*;

//请使用字节流，把“E:\itcast\窗里窗外.txt”文件，复制到模块目录下的“窗里窗外.txt”。
public class Demo4 {
    public static void main(String[] args) throws IOException {
        File startFile = new File("E:\\itcast\\窗里窗外.txt");
        File endFile = new File("homework", "窗里窗外.txt");
        FileInputStream fis = new FileInputStream(startFile);
        FileOutputStream fos = new FileOutputStream(endFile);

        int b;
        while ((b = fis.read()) != -1) {
            fos.write(b);
        }

        fis.close();
        fos.close();

    }
}
